home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import flash.media.Sound;
- import flash.media.SoundChannel;
- import flash.media.SoundMixer;
- import flash.media.SoundTransform;
-
- public class soundEngine extends Sound
- {
-
-
- public var rollSound:Sound;
-
- public var bail1Sound:Sound;
-
- public var soundON:Boolean = true;
-
- public var bail1Channel:SoundChannel;
-
- public var softlandChannel:SoundChannel;
-
- public var cheerSound:Sound;
-
- public var ollieSound:Sound;
-
- public var rollChannel:SoundChannel;
-
- private var scope:Object;
-
- public var bgSound:Sound;
-
- public var cheerChannel:SoundChannel;
-
- public var ollieChannel:SoundChannel;
-
- public var softlandSound:Sound;
-
- public var bgChannel:SoundChannel;
-
- public function soundEngine(param1:*)
- {
- soundON = true;
- bgSound = new bgMusic();
- bgChannel = new SoundChannel();
- rollSound = new skate_roll();
- rollChannel = new SoundChannel();
- ollieSound = new skate_clack();
- ollieChannel = new SoundChannel();
- softlandSound = new skate_softland2();
- softlandChannel = new SoundChannel();
- bail1Sound = new skate_bail2();
- bail1Channel = new SoundChannel();
- cheerSound = new skate_finishCheer();
- cheerChannel = new SoundChannel();
- super();
- scope = param1;
- }
-
- public function setVolume(param1:String, param2:Number) : *
- {
- var _loc3_:* = undefined;
- _loc3_ = this[param1 + "Channel"].soundTransform;
- _loc3_.volume = param2;
- this[param1 + "Channel"].soundTransform = _loc3_;
- }
-
- public function stopSound(param1:String) : *
- {
- this[param1 + "Channel"].stop();
- }
-
- public function restartSounds() : *
- {
- startSound("bg",0,9999,0.5,0);
- startSound("roll",0,9999,0,0);
- }
-
- public function startSound(param1:String, param2:Number, param3:Number, param4:Number, param5:Number) : *
- {
- if(soundON)
- {
- this[param1 + "Channel"] = this[param1 + "Sound"].play(param2,param3,new SoundTransform(param4,param5));
- }
- }
-
- public function stopSounds() : *
- {
- SoundMixer.stopAll();
- }
- }
- }
-